<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Navo Portable Library: navo/algorithm/hash/signature/sha256.h文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 制作者 Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Navo Portable Library&#160;<span id="projectnumber">Ver 1.0.20120827</span></div>
   <div id="projectbrief">Provides generic platform independent facilities.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>数据结构</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>全局定义</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">数据结构</a> &#124;
<a href="#define-members">宏定义</a> &#124;
<a href="#typedef-members">类型定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<h1>navo/algorithm/hash/signature/sha256.h文件参考</h1>  </div>
</div>
<div class="contents">

<p>Definitions and declarations for SHA-256.  
<a href="#_details">更多...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="cdef_8h_source.html">../../../port/cdef.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="integer_8h_source.html">../../../port/integer.h</a>&quot;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
</div>
<p><a href="sha256_8h_source.html">浏览该文件的源代码。</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
数据结构</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsha256__ctx.html">sha256_ctx</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">SHA-256上下文  <a href="structsha256__ctx.html#_details">更多...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
宏定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a73989f4e4387816cd2c8b0e08a2dcdff"></a><!-- doxytag: member="sha256.h::__NV_SHA256__" ref="a73989f4e4387816cd2c8b0e08a2dcdff" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>__NV_SHA256__</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga64ba5039721e86468d05f6ad0f594dc8"></a><!-- doxytag: member="sha256.h::SHA256_HASH_H0" ref="ga64ba5039721e86468d05f6ad0f594dc8" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA256_HASH_H0</b>&#160;&#160;&#160;0x6A09E667UL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga17079bec9e14a8ddef16c611bf636ac7"></a><!-- doxytag: member="sha256.h::SHA256_HASH_H1" ref="ga17079bec9e14a8ddef16c611bf636ac7" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA256_HASH_H1</b>&#160;&#160;&#160;0xBB67AE85UL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga38aff27aa72a1fb7ee06df3d1738155e"></a><!-- doxytag: member="sha256.h::SHA256_HASH_H2" ref="ga38aff27aa72a1fb7ee06df3d1738155e" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA256_HASH_H2</b>&#160;&#160;&#160;0x3C6EF372UL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8b6e6d229f388410770420eb041862d9"></a><!-- doxytag: member="sha256.h::SHA256_HASH_H3" ref="ga8b6e6d229f388410770420eb041862d9" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA256_HASH_H3</b>&#160;&#160;&#160;0xA54FF53AUL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab162d859c79d76fbe9e10c561345e811"></a><!-- doxytag: member="sha256.h::SHA256_HASH_H4" ref="gab162d859c79d76fbe9e10c561345e811" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA256_HASH_H4</b>&#160;&#160;&#160;0x510E527FUL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga229317bc483a1ac9952af316305ed52e"></a><!-- doxytag: member="sha256.h::SHA256_HASH_H5" ref="ga229317bc483a1ac9952af316305ed52e" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA256_HASH_H5</b>&#160;&#160;&#160;0x9B05688CUL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1895074d060c6c399ab511fbfeb7e7e7"></a><!-- doxytag: member="sha256.h::SHA256_HASH_H6" ref="ga1895074d060c6c399ab511fbfeb7e7e7" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA256_HASH_H6</b>&#160;&#160;&#160;0x1F83D9ABUL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab7b4348eea55ee2e7461388d0823954b"></a><!-- doxytag: member="sha256.h::SHA256_HASH_H7" ref="gab7b4348eea55ee2e7461388d0823954b" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA256_HASH_H7</b>&#160;&#160;&#160;0x5BE0CD19UL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gabd1f121d402291e4fc4b659f9359df8b"></a><!-- doxytag: member="sha256.h::SHA224_HASH_H0" ref="gabd1f121d402291e4fc4b659f9359df8b" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA224_HASH_H0</b>&#160;&#160;&#160;0x6A09E667UL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8712b68b42b698958d94da6658953789"></a><!-- doxytag: member="sha256.h::SHA224_HASH_H1" ref="ga8712b68b42b698958d94da6658953789" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA224_HASH_H1</b>&#160;&#160;&#160;0xBB67AE85UL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga2255124a3817d894637f4edd9c3b7b0e"></a><!-- doxytag: member="sha256.h::SHA224_HASH_H2" ref="ga2255124a3817d894637f4edd9c3b7b0e" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA224_HASH_H2</b>&#160;&#160;&#160;0x3C6EF372UL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7ef1607c872756d1dbaac558f4f2a4bf"></a><!-- doxytag: member="sha256.h::SHA224_HASH_H3" ref="ga7ef1607c872756d1dbaac558f4f2a4bf" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA224_HASH_H3</b>&#160;&#160;&#160;0xA54FF53AUL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae866b991fe0500663ae3c6f62bc1b52e"></a><!-- doxytag: member="sha256.h::SHA224_HASH_H4" ref="gae866b991fe0500663ae3c6f62bc1b52e" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA224_HASH_H4</b>&#160;&#160;&#160;0x510E527FUL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gada03c3a8d4f29a82712919d73757af6e"></a><!-- doxytag: member="sha256.h::SHA224_HASH_H5" ref="gada03c3a8d4f29a82712919d73757af6e" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA224_HASH_H5</b>&#160;&#160;&#160;0x9B05688CUL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga53a8633e5f4f0dfd9562da2657ac2f7e"></a><!-- doxytag: member="sha256.h::SHA224_HASH_H6" ref="ga53a8633e5f4f0dfd9562da2657ac2f7e" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA224_HASH_H6</b>&#160;&#160;&#160;0x1F83D9ABUL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab263d31a3d993a0961167f20217b7807"></a><!-- doxytag: member="sha256.h::SHA224_HASH_H7" ref="gab263d31a3d993a0961167f20217b7807" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA224_HASH_H7</b>&#160;&#160;&#160;0x5BE0CD19UL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7e07dab5a5c98bb6dc90b13e6c5392d7"></a><!-- doxytag: member="sha256.h::SHA256_SIZE" ref="ga7e07dab5a5c98bb6dc90b13e6c5392d7" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA256_SIZE</b>&#160;&#160;&#160;32</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3472f9737b8b96ac2e407777580afe80"></a><!-- doxytag: member="sha256.h::SHA224_SIZE" ref="ga3472f9737b8b96ac2e407777580afe80" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA224_SIZE</b>&#160;&#160;&#160;28</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__SHA-256__224.html#ga3f59e35bbeb37e935126641d69f90407">SHA256_CTX</a>(name)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义名为name的SHA-256上下文  <a href="group__SHA-256__224.html#ga3f59e35bbeb37e935126641d69f90407"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__SHA-256__224.html#ga66a63ff4bea37389ebea2ba1e553e980">SHA224_CTX</a>(name)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义名为name的SHA-224上下文  <a href="group__SHA-256__224.html#ga66a63ff4bea37389ebea2ba1e553e980"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__SHA-256__224.html#ga14a465a2682c74c519b1aff8eb1ddd81">sha256_update</a>(ctx, buf, cnt)&#160;&#160;&#160;__sha256_update(ctx, (<a class="el" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2">uint8_t</a>*)(buf), cnt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算哈希值  <a href="group__SHA-256__224.html#ga14a465a2682c74c519b1aff8eb1ddd81"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__SHA-256__224.html#ga4d601457ca2d51f9600dd61a29d66aa1">sha224_update</a>(ctx, buf, cnt)&#160;&#160;&#160;__sha256_update(ctx, (<a class="el" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2">uint8_t</a>*)(buf), cnt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算哈希值  <a href="group__SHA-256__224.html#ga4d601457ca2d51f9600dd61a29d66aa1"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
类型定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga88cef7dc124df00c2cd8b203fa6e003f"></a><!-- doxytag: member="sha256.h::sha224_ctx" ref="ga88cef7dc124df00c2cd8b203fa6e003f" args="" -->
typedef struct <a class="el" href="structsha256__ctx.html">sha256_ctx</a>&#160;</td><td class="memItemRight" valign="bottom"><b>sha224_ctx</b></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
函数</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5215940b2d6577d38f5e27634cf39a70"></a><!-- doxytag: member="sha256.h::__sha256_init" ref="ga5215940b2d6577d38f5e27634cf39a70" args="(uint32_t *digest, uint32_t *cnt)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>__sha256_init</b> (uint32_t *digest, uint32_t *cnt)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__SHA-256__224.html#ga4685665d7ee57538983638f53e096869">sha256_init</a> (<a class="el" href="structsha256__ctx.html">sha256_ctx</a> *ctx)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化SHA256上下文  <a href="group__SHA-256__224.html#ga4685665d7ee57538983638f53e096869"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1cc16ff33de011a426ce953b41a6da9e"></a><!-- doxytag: member="sha256.h::__sha256_update" ref="ga1cc16ff33de011a426ce953b41a6da9e" args="(sha256_ctx *ctx, uint8_t *buf, size_t cnt)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__sha256_update</b> (<a class="el" href="structsha256__ctx.html">sha256_ctx</a> *ctx, <a class="el" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2">uint8_t</a> *buf, size_t cnt)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__SHA-256__224.html#ga8b34382e94f499437c3645f912be9731">sha256_final</a> (<a class="el" href="structsha256__ctx.html">sha256_ctx</a> *ctx, void *digest)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">获取SHA256校验值  <a href="group__SHA-256__224.html#ga8b34382e94f499437c3645f912be9731"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7f7f8f0933e1c3af9ba5db8342da992d"></a><!-- doxytag: member="sha256.h::__sha224_init" ref="ga7f7f8f0933e1c3af9ba5db8342da992d" args="(uint32_t *digest, uint32_t *cnt)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>__sha224_init</b> (uint32_t *digest, uint32_t *cnt)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__SHA-256__224.html#gafad856587d338170b3124b9622fbc870">sha224_init</a> (<a class="el" href="structsha224__ctx.html">sha224_ctx</a> *ctx)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化SHA224上下文  <a href="group__SHA-256__224.html#gafad856587d338170b3124b9622fbc870"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac7148bb856e2e96066bd371d45fbcf0a"></a><!-- doxytag: member="sha256.h::__sha224_update" ref="gac7148bb856e2e96066bd371d45fbcf0a" args="(sha224_ctx *ctx, uint8_t *buf, size_t cnt)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__sha224_update</b> (<a class="el" href="structsha224__ctx.html">sha224_ctx</a> *ctx, <a class="el" href="group___xE6_x95_xB4_xE5_x9E_x8B_xE5_xAE_x9A_xE4_xB9_x89.html#gae1affc9ca37cfb624959c866a73f83c2">uint8_t</a> *buf, size_t cnt)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__SHA-256__224.html#ga79efe75a19b03d03c08884443723b979">sha224_final</a> (<a class="el" href="structsha224__ctx.html">sha224_ctx</a> *ctx, void *digest)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">获取SHA224校验值  <a href="group__SHA-256__224.html#ga79efe75a19b03d03c08884443723b979"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>详细描述</h2>
<div class="textblock"><p>Definitions and declarations for SHA-256. </p>
<p>Copyright (C) 2012-2022, Henry Kwok 郭弘扬. All rights reserved </p>

<p>在文件<a class="el" href="sha256_8h_source.html">sha256.h</a>中定义。</p>
</div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>数据结构</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>类型定义</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated at 2015年七月16日 星期四 12:00:39 for Navo Portable Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
